//
//  MyBoundingButton.h
//  CanYouDoIt
//
//  Created by hoangtx on 7/10/13.
//
//

#ifndef CanYouDoIt_MyBouncingButton_h
#define CanYouDoIt_MyBouncingButton_h

#include "MyPageButton.h"
using namespace cocos2d;

class MyBouncingButton : public MyPageButton{
public:
    CCRect limitRect;
    double originalVelocity;
    double velocity;
    double signX;
    double signY;
    void goFaster();
    void addLimitRect(CCRect mLimitRect);
    void handleUpdate(float dt);
    void pushToMoveToRandomDirection();
    bool isOnTheSameDiretionWith(MyBouncingButton* otherButton);
    static MyBouncingButton* create(const char* fileName, double mX,double mY,double mWidth,double mHeight);
    virtual bool init();
    CREATE_FUNC(MyBouncingButton);
};


#endif
